package Widget

import (
	"github.com/lxn/walk"
	"github.com/lxn/walk/declarative"
)

type XWindows struct {
	*Window

	// 样式
	Style *declarative.Layout
}

func (m *XWindows) AddChild(cl declarative.Widget) {
	m.Window.Children = append(m.Window.Children, cl)
}

func CreateWindows(mw *walk.MainWindow, title string, w, h int) *XWindows {
	xw := &XWindows{
		Window: &Window{
			AssignTo: &mw,
			Title:    title,
			Size: declarative.Size{
				Width:  w,
				Height: h,
			},
			Layout: declarative.VBox{},
		},
	}

	return xw
}
